import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/article/list`,
		name: "数据列表",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	detail: {
		url: `${config.API_URL}/article/detail`,
		name: "详情数据",
		get: async function(params){
			return await http.get(this.url +'/'+ params);
		}
	},
	del: {
		url: `${config.API_URL}/article/del`,
		name: "删除数据",
		delete: async function(data){
			return await http.delete(this.url, data);
		}
	},
	add: {
		url: `${config.API_URL}/article/edit`,
		name: "编辑数据",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
}
